<? $this->view('admin/helper/filter/users_filter'); ?>
<!--datatables tools-->
<div class="row-fluid">
    <div class="span12">
        <div class="box corner-all">
            <div class="box-header grd-white corner-top">
                <div class="header-control">
                    <a data-box="collapse"><i class="icofont-caret-up"></i></a>
                </div>
                <span><?= lang('label_menu_link_banks') ?></span>
            </div>
            <div class="box-body">
                <form action="<?= base_url() ?><?= get_segment(1) ?>/<?= get_segment(2) ?>/all" method="post" style="margin-bottom: 5px;" >
                    <table id="datatablestools" class="table table-hover responsive">
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="DTTT btn-group">
                                    <select class="droop_tool_box" name='doaction'>
                                        <option value=""><?= lang('label_choose_fromlist') ?></option>
                                        <option value="no_trash"><?= lang('label_no_trash') ?></option>
                                        <option value="delete_final"><?= lang('label_delete_final') ?></option>
                                    </select>
                                    <button class="btn DTTT_button_collection" ><span><?= lang('label_save') ?></span></button></div>
                            </div>
                            <div class="span6">
                                <div class="DTTT btn-group" style="float: left">
                                    <a href="<?= base_url() ?><?= get_segment(1) ?>/<?= get_segment(2) ?>/csv/?<?= uri_get() ?>" class="btn DTTT_button_collection" id="ToolTables_datatablestools_2"><span><?= lang('label_save') ?> scv</span></a></div>
                            </div>
                        </div>
                        <thead>
                            <tr>
                                <th><input type="checkbox" id="checkall" name="all"></th>
                                <th><?= lang('label_name') ?></th>
                                <th><?= lang('label_owner') ?></th>
                                <th><?= lang('label_number') ?></th>
                                <th><?= lang('label_ibn') ?></th>
                                <th><?= lang('label_add_by') ?></th>
                                <th><?= lang('label_created_date') ?></th>
                                <th><?= lang('label_last_update') ?></th>
                                <th><?= lang('label_user_update') ?></th>
                                <th><?= lang('label_tool') ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?
                            foreach ($result as $value) {
                                $user_add = get_userdata_with_id($value->user_id, '*');
                                $user_update = get_userdata_with_id($value->user_update, '*');
                                ?>
                                <tr class="gradeA">
                                    <td><input type="checkbox" class="checkall" value="<?= $value->id ?>" name="id[]"></td>
                                    <td class="w300"><a href="<?= base_url() . ADMIN_FOLDER ?>/<?= get_segment(2) ?>/view/<?= $value->id ?>"><?= $value->title ?></a></td>
                                    <td><?= $value->owner ?></td>
                                    <td><?= $value->number ?></td>
                                    <td><?= $value->iban ?></td>
                                    <td>
                                        <?
                                        if (isset($user_add['id'])) {
                                            ?>
                                            <a href='<?= base_url() . ADMIN_FOLDER ?>/users/view/<?= $user_add['id'] ?>'><?= $user_add['username'] ?></a>
                                            <?
                                        } else {
                                            ?>
                                            -----
                                            <?
                                        }
                                        ?></td>
                                    <td><?= timespan($value->create_date, time()) ?></td>
                                    <td><?= timespan($value->modify_date, time()) ?></td>
                                    <td>
                                        <?
                                        if (isset($user_update['id'])) {
                                            ?>
                                            <a href='<?= base_url() . ADMIN_FOLDER ?>/users/view/<?= $user_update['id'] ?>'><?= $user_update['username'] ?></a>
                                            <?
                                        } else {
                                            ?>
                                            -----
                                            <?
                                        }
                                        ?></td>

                                    <td class="center">
                                        <div class="btn-group">
                                            <button class="btn  dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i>  <?= lang('label_operation') ?> <span class="caret"></span></button>
                                            <ul class="dropdown-menu">
                                                <li><a href="<?= base_url() . ADMIN_FOLDER ?>/banks/no_trash/<?= $value->id ?>"><i  class="icon-repeat"></i> <?= lang('label_no_trash') ?></a></li>
                                                <li><a class="delete_confirm" href="<?= base_url() . ADMIN_FOLDER ?>/banks/delete_final/<?= $value->id ?>"><i  class="icon-trash"></i> <?= lang('label_delete_final') ?></a></li>
                                            </ul>
                                        </div>

                                    </td>
                                </tr>
                            <?php } ?>

                        </tbody>
                    </table>
                    <div class="row-fluid">
                        <div class="span6">
                            <div class="DTTT btn-group">
                                <select class="droop_tool_box" name='doaction'>
                                    <option value=""><?= lang('label_choose_fromlist') ?></option>
                                    <option value="no_trash"><?= lang('label_no_trash') ?></option>
                                    <option value="delete_final"><?= lang('label_delete_final') ?></option>
                                </select>
                                <button class="btn DTTT_button_collection" ><span><?= lang('label_save') ?></span></button></div>
                        </div>
                        <div class="span6">
                            <div class="DTTT btn-group" style="float: left">
                                <a href="<?= base_url() ?><?= get_segment(1) ?>/<?= get_segment(2) ?>/csv/?<?= uri_get() ?>" class="btn DTTT_button_collection" id="ToolTables_datatablestools_2"><span><?= lang('label_save') ?> scv</span></a></div>
                        </div>
                    </div>
                </form>
                <?= $pagination ?>
            </div><!-- /box-body -->
        </div><!-- /box -->
    </div><!-- /span -->
</div><!--/datatables tools-->

<div id="action_load_mudle">
    <!-- action contant  -->

</div>